/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sim.misc;

import java.text.SimpleDateFormat;
import java.util.Calendar;

/**
 *
 * @author artem
 */
public class DateUtils {

    public static final String DATE_FORMAT_NOW_FULL = "yyyyMMddHHmmss";
    public static final String DATE_FORMAT_NOW_DATE = "yyyyMMdd";
    public static final String DATE_FORMAT_NOW_TIME = "HHmmss";

    public static String now(String str){
        Calendar calendar = Calendar.getInstance();
        SimpleDateFormat sdf = new SimpleDateFormat(str);
        return sdf.format(calendar.getTime());
    }
}
